package com.yansu.own.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yansu.own.entity.dto.SysBannerSearchDto;
import com.yansu.own.entity.dto.SysBannerUpdateDto;
import com.yansu.own.entity.pojo.SysBanner;
import com.yansu.own.entity.vo.SysBannerMapVo;
import com.yansu.own.entity.vo.SysBannerVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface SysBannerMapper extends BaseMapper<SysBanner> {
    /**
     * 获取banner列表数据
     */
    List<SysBannerVo> getBannerTable(SysBannerSearchDto searchDto);

    /**
     * 添加banner_manager表数据
     */
    int addBanner(SysBannerUpdateDto insertDto);

    /**
     * 添加user_banner关联表数据（部分用户）
     */
    int addUserBanner(@Param("bannerId") Long bannerId, @Param("userId") Long userId);

    int addBannerMap(SysBannerMapVo banner);

//    int updateBanner(BannerManageEntity pojo);

//    int deleteUserBanner(int id);

//    BannerManageEntity getBannerById(int id);

//    List<SysUserBanner> getBannerUserByUserId(Long userId);
}
